﻿using MiniExcelLibs;
using MiniExcelLibs.Attributes;

namespace _StudentImport
{
    internal class Program
    {
        static void Main(string[] args)
        {
            using (var stream = File.OpenRead(@"C:\Users\humengjian\Desktop\9a94369e88a8ab2c1e7eac9ef6b0063d_e1ec543285a72135458d16ebff56e52b_8.xlsx"))
            {
                var students = MiniExcel.Query<ImportStudentInputTranform>(stream).ToList();
            }
        }
    }

    public class ImportStudentInputTranform
    {
        [ExcelColumnName("序号")]
        public int? Number { get; set; }
        /// <summary>
        /// Desc:班级名称
        /// Default:
        /// Nullable:True
        /// </summary>               
        [ExcelColumnName("班级")]
        public string ClassName { get; set; }

        /// <summary>
        /// Desc:特种作业
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("特种作业")]
        public string SpecialWork { get; set; }

        /// <summary>
        /// Desc:特种设备
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("特种设备")]
        public string SpecialEquipment { get; set; }

        /// <summary>
        /// Desc:报名日期
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("报名日期")]
        public DateTime? RegistrationDate { get; set; }

        /// <summary>
        /// Desc:姓名
        /// Default:
        /// Nullable:False
        /// </summary>           
        [ExcelColumnName("姓名")]
        public string Name { get; set; }

        /// <summary>
        /// Desc:身份证号码
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("身份证号码")]
        public string IdCard { get; set; }

        /// <summary>
        /// Desc:性别
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("性别")]
        public string Gender { get; set; }

        /// <summary>
        /// Desc:民族
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("民族")]
        public string Nation { get; set; }

        /// <summary>
        /// Desc:学历
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("学历")]
        public string Education { get; set; }

        /// <summary>
        /// Desc:联系方式
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("本人联系方式")]
        public string Telephone { get; set; }

        /// <summary>
        /// Desc:单位名称
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("单位名称")]
        public string Company { get; set; }

        /// <summary>
        /// Desc:作业类别
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("作业类别")]
        public string WorkType { get; set; }

        /// <summary>
        /// Desc:项目代码
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("负责/项目代码")]
        public string ProjectCode { get; set; }

        /// <summary>
        /// Desc:培训类型：初培/复审
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("初培/复审")]
        public string TrainingType { get; set; }

        /// <summary>
        /// Desc:发证日期
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("发证日期")]
        public DateTime? CertificationDate { get; set; }

        /// <summary>
        /// Desc:复审日期
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("复审日期")]
        public DateTime? RetrialDate { get; set; }

        /// <summary>
        /// Desc:区域
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("区域")]
        public string Area { get; set; }

        /// <summary>
        /// Desc:备注联系人
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("备注联系人")]
        public string NoteContacts { get; set; }

        /// <summary>
        /// Desc:是否缴费
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("是否缴费")]
        public string IsPay { get; set; }



        /// <summary>
        /// Desc:缴费方式:微信、支付宝、对公账户
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("缴费方式")]
        public string PayType { get; set; }


        /// <summary>
        /// Desc:缴费金额
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("缴费金额")]
        public decimal? Amount { get; set; }

        /// <summary>
        /// 缴费备注
        /// </summary>
        [ExcelColumnName("备注")]
        public string PayRemake { get; set; }

        /// <summary>
        /// Desc:是否开具发票
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("是否开具发票")]
        public string IsInvoice { get; set; }

        /// <summary>
        /// Desc:是否开具收据
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("是否开具收据")]
        public string IsReceipt { get; set; }

        /// <summary>
        /// Desc:取证日期
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("取证日期")]
        public DateTime? ObtainDate { get; set; }

        /// <summary>
        /// Desc:取证人员
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("特种设备")]
        public string ObtainName { get; set; }

        /// <summary>
        /// Desc:理论上课时间
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("理论上课时间")]
        public DateTime? ThoeryClassDate { get; set; }

        /// <summary>
        /// Desc:实操上课时间
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("实操上课时间")]
        public DateTime? OperationClassDate { get; set; }

        /// <summary>
        /// Desc:第几次考试
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("第几次考试")]
        public int? ExamTimes { get; set; }

        /// <summary>
        /// Desc:是否通过考试
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("是否通过考试")]
        public string IsPassExam { get; set; }

        /// <summary>
        /// Desc:第几次培训
        /// Default:
        /// Nullable:True
        /// </summary>           
        [ExcelColumnName("第几次培训")]
        public int? TrainingTimes { get; set; }

    }
}
